<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Mc extends MY_Controller {

	function Mc()
	{
		parent::MY_Controller();
        $this->load->helper('page');
	}

	function index()
	{
		page_common();
		$this->load->model('Mconfigs');
		$this->load->model('mflash');
		$flashs = $this->mflash->get_flash_list();
		//$this->load->model('Madv');
		//$advs = $this->Madv->get_index_adv();
		$this->load->model('mnetbar');
		$areas = $this->mnetbar->get_index_area();
		$this->load->model('mproduct');
		$ptypes = $this->mproduct->get_product_types();
		$pro_limit = $this->Mconfigs->get_config_value('index_pro_limit');
		$products = $this->mproduct->get_products_group_by_type($pro_limit);
		$hot_limit = $this->Mconfigs->get_config_value('index_hot_limit');
		$hots = $this->mproduct->get_hot_products($hot_limit);
		//$this->template->assign_array($advs);
		$this->template->view('v1/index',array('flashs'=>$flashs,'areas'=>$areas,'ptypes'=>$ptypes,'products'=>$products,'hots'=>$hots));
	}

    function a() {
        echo '1111';
    }

}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
?>